""" 
续电器控制
"""

# 导入Pin模块
from machine import Pin
import time

relay_pin = Pin(25, Pin.OUT)  # GPIO25输出
count = 10
print("relay start")
while count > 0:
    relay_pin.value(1)  # 继电器开
    time.sleep(2)
    relay_pin.value(0)
    time.sleep(1)
    count -= 1

relay_pin.value(0)  # 强制关闭继电器
print("relay end")
